Computers of today can not be trusted to one hundred percent. Computers contain software that easily can be tampered with. Programs can be written that secretly alter the computer's actions. Well-known examples are the plethora of viruses that constantly plague computer users all over the world. The viruses replicate themselves and often destroy information or modify computer programs to perform harmful actions. Thus in a client-server situation the server cannot trust code residing in the client to do what it is supposed to do, or even trust that the code that is supposed to be executed actually is executed on the client. A piece of code on the client may easily be modified to do something other than it is supposed to do or to do something in addition to what it is supposed to do. It is possible that the code is modified to do something malicious that may cause trouble on the client side and/or server side without a user of the client noticing anything. The server has no control over the execution environment on the client side. For this reason the client-server relationship is usually arranged so that all code that performs something even remotely sensitive is executed on the server side. In this way the server has control over the execution of all code portions that are considered to be critical for some reason.
Many large software manufacturers of today sign their code digitally to make it possible to ensure that the code has not been tampered with. However, when the code is executed in an environment that is not secure, the signed code may be exchanged for another piece of code. The memory of a conventional computer, where the code resides, may be modified e.g. using direct memory access, and as a result an executing program, although digitally signed, may execute differently from what was initially intended. Many operating systems are provided with protective mechanisms to prevent tampering. But conventional operating systems are insecure environments and it is thus possible to manipulate the protective mechanisms.